﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucCongViec.ascx.cs" Inherits="STT.Admin.UserControls.UcCongViec" %>
<div id="content-header">
    <div id="breadcrumb">
        <a href="../Admin/Default.aspx?idpage=1" class="tip-bottom" data-original-title="Về bảng điều khiển">
            <i class="icon-home"></i>Trang chính
        </a>
        <a href="../Admin/Default.aspx?" class="current">Tìm kiếm</a>
        <a href="../Admin/Default.aspx?" class="current">Tìm kiếm giảng viên</a>
    </div>
</div>
<div class="widget-box collapsible">
    <div class="widget-title">
        <a href="#collapseOne" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Tạo công việc</h5>
        </a>
    </div>
    <div class="in" id="collapseOne" style="height: auto;">
        <div class="widget-content nopadding">
            <div class="dataTables_wrapper" role="grid">
                <%-- Cac dieu kien tim kiem --%>
                <div class="container-fluid">
                    <div class="row-fluid">
                        <div class="span6">
                             <div class="control-group">
                                <label class="control-label">Chọn loại công việc: </label>
                                <div class="controls">
                                      <asp:DropDownList ID="DdlLoaiCongViec" runat="server" CssClass="span20" OnSelectedIndexChanged="DdlLoaiCongViec_SelectedIndexChanged" AutoPostBack="true">
                                          <asp:ListItem Value="0">---------Chọn---------</asp:ListItem>
                                           <asp:ListItem Value="1">Coi thi</asp:ListItem>
                                           <asp:ListItem Value="2">Chấm thi</asp:ListItem>
                                           <asp:ListItem Value="3">Ra đề thi</asp:ListItem>
                                      </asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa chọn loại công việc" ValidationGroup="cv" ControlToValidate="DdlLoaiCongViec"></asp:RequiredFieldValidator> 
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Tên giảng viên: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="DdlGiangVien" runat="server" CssClass="span20" OnSelectedIndexChanged="DdlGiangVien_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa nhập mã giảng viên" ValidationGroup="cv" ControlToValidate="DdlGiangVien"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Mã giảng viên: </label>
                                <div class="controls">
                                    <asp:TextBox ID="txtMaGiangVien" Enabled="false" Width="92%" runat="server" class="span20" placeholder="Tên giảng viên"></asp:TextBox>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Chọn Khóa: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlChonKhoa" runat="server" CssClass="span20" OnSelectedIndexChanged="ddlChonKhoa_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa chọn khóa học" ValidationGroup="cv" ControlToValidate="ddlChonKhoa"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Chọn lớp: </label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlChonLop" runat="server" CssClass="span20" AutoPostBack="true" OnSelectedIndexChanged="ddlChonLop_SelectedIndexChanged"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa chọn lớp học" ValidationGroup="cv" ControlToValidate="ddlChonLop"></asp:RequiredFieldValidator>
                                </div>
                            </div>
                        </div>
                        <div class="span6">   
                             <div class="control-group">
                                <label class="control-label">Chọn môn học :</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlMonHoc" runat="server" CssClass="span20"></asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa chọn môn học" ValidationGroup="cv" ControlToValidate="ddlMonHoc"></asp:RequiredFieldValidator>        
                                </div>
                            </div>
                            <asp:Panel ID="pnCoiThi" runat="server" Visible="false">                                              
                            <div class="control-group">
                                <label class="control-label">Ca thi :</label>
                                <div class="controls">
                                    <asp:DropDownList ID="ddlCaThi" runat="server" CssClass="span20">
                                        <asp:ListItem Value="0">---------Chọn---------</asp:ListItem>
                                        <asp:ListItem Value="1">Ca 1</asp:ListItem>
                                        <asp:ListItem Value="2">Ca 2</asp:ListItem>
                                        <asp:ListItem Value="3">Ca 3</asp:ListItem>
                                        <asp:ListItem Value="4">Ca 4</asp:ListItem>
                                    </asp:DropDownList>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa chọn ca thi" ValidationGroup="cv" ControlToValidate="ddlCaThi"></asp:RequiredFieldValidator>           
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Ngày Thi :</label>
                                <div class="controls">
                                      <asp:TextBox ID="txtNgayThi" runat="server" TextMode="Date" CssClass="span20" placeholder="Ngày Thi"></asp:TextBox>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa nhập ngày thi" ValidationGroup="cv" ControlToValidate="txtNgayThi"></asp:RequiredFieldValidator>           
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Phòng thi :</label>
                                <div class="controls"> 
                                <asp:TextBox ID="txtPhongThi" runat="server" placeholder="Phòng Thi" CssClass="span20"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa nhập phòng thi" ValidationGroup="cv" ControlToValidate="txtPhongThi"></asp:RequiredFieldValidator> 
                                </div>
                            </div>
                            </asp:Panel> 
                            <asp:Panel ID="pnRaDe" runat="server" Visible="false">                                                       
                            <div class="control-group">
                                <label class="control-label">Ngày Ra Đề :</label>
                                <div class="controls">
                                   <asp:TextBox ID="txtngayrade" runat="server" TextMode="Date" CssClass="span20" placeholder="Ngày Ra Đề"></asp:TextBox>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa nhập ngày ra đề" ValidationGroup="cv" ControlToValidate="txtngayrade"></asp:RequiredFieldValidator>           
                                </div>
                            </div>
                            </asp:Panel> 
                            <asp:Panel ID="pnChamThi" runat="server" Visible="false">                                                       
                            <div class="control-group">
                                <label class="control-label">Ngày Nhận Tập Bài Thi :</label>
                                <div class="controls">
                                   <asp:TextBox ID="txtNgayNhanBT" runat="server" TextMode="Date" CssClass="span20" placeholder="Ngày nhận tập bài thi"></asp:TextBox>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa nhập ngày nhận tập bài thi" ValidationGroup="cv" ControlToValidate="txtNgayNhanBT"></asp:RequiredFieldValidator>           
                                </div>
                            </div>
                            </asp:Panel> 
                          <%--  <div class="control-group">
                                <label class="control-label">Nội dung công việc: </label>
                                <div class="controls">
                                   <asp:TextBox ID="txtNoiDungCV" runat="server" class="span20" TextMode="MultiLine" placeholder="Nội dung công việc"></asp:TextBox>
                                   <asp:RequiredFieldValidator ID="RequiredFieldValidator22" runat="server" ErrorMessage="*" ForeColor="Red" Font-Bold="true" ToolTip="Bạn chưa nhập nội dung công việc" ValidationGroup="cv" ControlToValidate="txtNoiDungCV"></asp:RequiredFieldValidator>
                                </div>
                            </div>--%>
                        </div>
                    </div>
                </div>
                <div class="fg-toolbar ui-toolbar ui-widget-header ui-corner-bl">
                    <asp:Button ID="btTaocv" runat="server" Text="Tạo công việc" CssClass="btn btn-info" ValidationGroup="cv"
                        OnClick="btTaocv_Click" />
                </div>
            </div>
        </div>
    </div>
    <%-- Gridview ket qua tim kiem --%>
    <div class="widget-title">
        <a href="#collapseTwo" data-toggle="collapse" class="">
            <span class="icon"><i class="icon-th"></i></span>
            <h5>Danh sách công việc</h5>
        </a>
    </div>
    <div class="in" id="collapseTwo" style="height: auto;">
        <div class="widget-content nopadding">
            <div id="DataTables_Table_0_wrapper" class="dataTables_wrapper" role="grid">
                  <h5>Danh sách công việc : Coi Thi</h5>
                   <asp:GridView ID="gvCoiThi" runat="server" CssClass="table table-bordered table-hover"
                        AutoGenerateColumns="False" DataKeyNames="MaCongViec" OnRowDeleting="gvCongViec_RowDeleting"
                        OnRowCommand="gvCongViec_RowCommand" OnPageIndexChanging="gvCongViec_PageIndexChanging"
                        EnableViewState="False" AllowPaging="True" PageSize="20">
                        <Columns>
                            <asp:BoundField DataField="MaCongViec" HeaderText="Mã công việc"
                                SortExpression="MaCongViec" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="NDCongViec" HeaderText="Nội dung công việc"
                                SortExpression="NDCongViec" ItemStyle-CssClass="span2" Visible="true">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="MaGV" HeaderText="Mã giảng viên"
                                SortExpression="MaGV" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:BoundField DataField="TenGV" HeaderText="Tên giảng viên"
                                SortExpression="TenGV" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="TenMonHoc" HeaderText="Tên môn học" ItemStyle-Width="180px"
                                SortExpression="TenMonHoc" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:BoundField DataField="TenLop" HeaderText="Tên Lớp"
                                SortExpression="TenLop" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:TemplateField HeaderText="Ngày Coi Thi" SortExpression="NgayCoiThi">                      
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%#  Bind("NgayCoiThi", "{0:yyyy/MM/dd}") %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="span2" />
                            </asp:TemplateField>
                            <asp:BoundField DataField="CaThi" HeaderText="Ca Thi"
                                SortExpression="CaThi" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Trạng thái xem" SortExpression="TrangThai">                      
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%#  Eval("TrangThai").ToString()=="0"?"Chưa đọc nhắc nhở":"Đã đọc" %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="span2" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                  <h5>Danh sách công việc : Chấm Thi</h5>
                   <asp:GridView ID="GvChamThi" runat="server" CssClass="table table-bordered table-hover"
                        AutoGenerateColumns="False" DataKeyNames="MaCongViec" OnRowDeleting="gvCongViec_RowDeleting"
                        OnRowCommand="gvCongViec_RowCommand" OnPageIndexChanging="gvCongViec_PageIndexChanging"
                        EnableViewState="False" AllowPaging="True" PageSize="20">
                        <Columns>
                            <asp:BoundField DataField="MaCongViec" HeaderText="Mã công việc"
                                SortExpression="MaCongViec" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="NDCongViec" HeaderText="Nội dung công việc"
                                SortExpression="NDCongViec" ItemStyle-CssClass="span2" Visible="true">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="MaGV" HeaderText="Mã giảng viên"
                                SortExpression="MaGV" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:BoundField DataField="TenGV" HeaderText="Tên giảng viên"
                                SortExpression="TenGV" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="TenMonHoc" HeaderText="Tên môn học" ItemStyle-Width="180px"
                                SortExpression="TenMonHoc" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:BoundField DataField="TenLop" HeaderText="Tên Lớp"
                                SortExpression="TenLop" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="NgayThi" HeaderText="Ngày Thi"
                                SortExpression="NgayThi" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="CaThi" HeaderText="Ca Thi"
                                SortExpression="CaThi" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Trạng thái xem" SortExpression="TrangThai">                      
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%#  Eval("TrangThai").ToString()=="0"?"Chưa đọc nhắc nhở":"Đã đọc" %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="span2" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                  <h5>Danh sách công việc : Ra đề</h5>
                   <asp:GridView ID="GvRaDe" runat="server" CssClass="table table-bordered table-hover"
                        AutoGenerateColumns="False" DataKeyNames="MaCongViec" OnRowDeleting="gvCongViec_RowDeleting"
                        OnRowCommand="gvCongViec_RowCommand" OnPageIndexChanging="gvCongViec_PageIndexChanging"
                        EnableViewState="False" AllowPaging="True" PageSize="20">
                        <Columns>
                            <asp:BoundField DataField="MaCongViec" HeaderText="Mã công việc"
                                SortExpression="MaCongViec" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="NDCongViec" HeaderText="Nội dung công việc"
                                SortExpression="NDCongViec" ItemStyle-CssClass="span2" Visible="true">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="MaGV" HeaderText="Mã giảng viên"
                                SortExpression="MaGV" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:BoundField DataField="TenGV" HeaderText="Tên giảng viên"
                                SortExpression="TenGV" ItemStyle-CssClass="span2">
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="TenMonHoc" HeaderText="Tên môn học" ItemStyle-Width="180px"
                                SortExpression="TenMonHoc" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                             <asp:BoundField DataField="TenLop" HeaderText="Tên Lớp"
                                SortExpression="TenLop" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="NgayThi" HeaderText="Ngày Thi"
                                SortExpression="NgayThi" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:BoundField DataField="CaThi" HeaderText="Ca Thi"
                                SortExpression="CaThi" ItemStyle-CssClass="span2" >
                                <ItemStyle CssClass="span2"></ItemStyle>
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="Trạng thái xem" SortExpression="TrangThai">                      
                                <ItemTemplate>
                                    <asp:Label ID="Label1" runat="server" Text='<%#  Eval("TrangThai").ToString()=="0"?"Chưa đọc nhắc nhở":"Đã đọc" %>'></asp:Label>
                                </ItemTemplate>
                                <ItemStyle CssClass="span2" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                </div>
        </div>
   </div>
    <div style="clear:both"></div>
</div>

